home *** CD-ROM | disk | FTP | other *** search
/ 3D Images / 3D Images.iso / programs / amiga / batchfactory / scripts / adpro / adpro_horizontal_mirror < prev    next >
Encoding:
Text File  |  1995-01-12  |  1.7 KB  |  71 lines

  1. /* 
  2.                           ADPRO HORIZONTAL MIRROR
  3.                                By J.L. White
  4.                           ©1994 Merlin's Software
  5.  
  6.            Load 24 Bit Image And Create Horizontal Mirror Image
  7.                          Art Department Pro Script
  8.  
  9.  Batch Factory Batch Conversion Scripts are basically Arexx scripts that
  10. allow you to pass certain parameters to the external program you wish
  11. to use to convert the images from one format to another. You can pass
  12. five different strings from Batch Factory to the script by using the
  13. following commands:
  14.  
  15. $N = This will pass the current selected filename.
  16. $P = This will tell Batch Factory to ask for a path to save new frames to.
  17. $# = This will pass the current frame number in the script.
  18. $T = This will pass the total number of frames in the script.
  19. $A = This will pass an offset number to be used to save frames with.
  20.  
  21. NOTE: The following line is required to work as a Batch Factory Script:
  22.  
  23. PARSE=$N $P $# $A $T
  24.  
  25. */
  26.  
  27. options results
  28. call Locate_ADPro
  29. address "ADPro"
  30.  
  31. arg TheFile OutFile FrameNum AddNum TotalNum
  32. SaveNum = FrameNum + AddNum
  33. if FrameNum = 1 then do
  34.     adpro_to_front
  35.     end
  36.  
  37. lformat "UNIVERSAL"
  38. load TheFile
  39. if RC ~= 0 then do
  40.    adpro_to_front
  41.    okay1 "Error Loading" TheFile
  42.    exit
  43. end
  44. XSize
  45. X = adpro_result
  46. YSize
  47. Y = adpro_result
  48. operator "Crop_Image" X/2 Y
  49. operator "Horizontal_Flip"
  50. saver "Temp" "XXX" "RAW"
  51. lformat "UNIVERSAL"
  52. load TheFile
  53. loader "Temp" "XXX" X/2 0 100
  54. operator "KillTemp"
  55.  
  56. sformat "IFF"
  57. if OutFile = "SAME" then
  58.     save TheFile "RAW"
  59. else
  60.     save OutFile""right(SaveNum,3,'0') "RAW"
  61. exit
  62.  
  63. Locate_ADPro:
  64.     if (POS('ADPro',SHOW('Ports')) = 0)
  65.     then do
  66.         address command 'run < nil: > nil: adpro:adpro MAXMEM=5000000'
  67.         address command 'wait 4'
  68.     end
  69. return
  70.  
  71.